package user

import (
	"dustbe/util"
	"net/http"

	"github.com/gin-gonic/gin"
)

func GetUserLocation(c *gin.Context) {
	location, err := util.GetLocationByContext(c)
	if err != nil {
		c.JSON(http.StatusOK, gin.H{"code" : 4001, "data" : err.Error()})
		return
	}
	c.JSON(http.StatusOK, gin.H{"code" : 200, "data" : location})
}